In the flattening histogram with distributing pixels to one or more densities, a complex processing is necessary that a part of number of pixels in one density is moved and added to number of pixels of one or more other densities. In the conventional method such complex processing seemed to be performed by MPU. It took long time of several minutes for processing histogram flattening of an image of 512.times.512.times.8 bit, in the conventional method.